/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.oper;

/**
 * <p>Project: app2022 - M3
 * <p>Powered by webrx On 2022-01-06 14:31:55
 *
* @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class M3 {
    public static void main(String[] args) {
        //与 &&(短路) &
        System.out.println(true && true);
        System.out.println(true && false);
        System.out.println(false && false);
        System.out.println(false && true);
        System.out.println(true & true);
        System.out.println(true & false);
        System.out.println(false & false);
        System.out.println(false & true);

        //或 ||(短路) |
        System.out.println(true || true);
        System.out.println(true || false);
        System.out.println(false || false);
        System.out.println(false || true);

        System.out.println(true | true);
        System.out.println(true | false);
        System.out.println(false | false);
        System.out.println(false | true);
        boolean f = false;
        System.out.println(!!!f == true); //false

        //异或
        System.out.println(true ^ true);
        System.out.println(false ^ false);
        System.out.println(true ^ false);
        System.out.println(false ^ true);

        String sex = "男";
        if ("女".equals(sex)) {
            System.out.println("女生");
        } else {
            System.out.println("男生");
        }

    }
}
